package com.ljfresh.customer.data;

import com.ljfresh.customer.pojo.ErpGoods;
import com.ljfresh.customer.result.TransferinDetailsResult;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

/**
 * @author: Lucifer
 * @time: 2020/5/9-11:46
 */
@AllArgsConstructor
@NoArgsConstructor
@Data
@ApiModel("调入单商品分页数据")
public class GoodsOrderFidData {

    @ApiModelProperty("调入单商品")
    private List<ErpGoods> list;

    @ApiModelProperty("当前页")
    private Integer pageNo;

    @ApiModelProperty("页面大小")
    private Integer pageSize;

    @ApiModelProperty("总页面")
    private Integer totalNum;

    @ApiModelProperty("总页面大小")
    private Integer totalCount;

    public void setTotalCount(Integer totalCount){
        this.totalCount = totalCount;
        if (totalCount%pageSize==0){
            totalNum = totalCount / pageSize;
        }else{
            totalNum = totalCount / pageSize+1;
        }
    }
}
